import { Component, OnInit } from '@angular/core';
import {ActivatedRoute} from '@angular/router';

@Component({
  selector: 'app-text-second',
  templateUrl: './text-second.component.html',
  styleUrls: ['./text-second.component.css']
})
export class TextSecondComponent implements OnInit {
  public lovethings: object;

  // public  fruit: string;
  // public  vegetables: string;
  // public  hobbies: string;

  constructor(private route: ActivatedRoute) { }

  ngOnInit() {
    this.route.queryParams.subscribe(params => {
      this.lovethings = params;
      console.log(params);

      // this.fruit = param.fruit;
      // this.vegetables = param.vegetables;
      // this.hobbies = param.hobbies;
    });
  }

}
